#include "Package.h"

Package::Package()
{
    this->m_head.clear();
    this->m_version = 0;
    this->m_id = 0;
    this->m_function = 0;
    this->m_length = 0;
    this->m_body.clear();
    this->m_checkCode = 0;
    this->m_tail.clear();

}
QByteArray Package::head() const
{
    return m_head;
}

void Package::setHead(const QByteArray &head)
{
    m_head = head;
}
quint8 Package::version() const
{
    return m_version;
}

void Package::setVersion(const quint8 &version)
{
    m_version = version;
}
quint16 Package::id() const
{
    return m_id;
}

void Package::setId(const quint16 &id)
{
    m_id = id;
}
int Package::function() const
{
    return m_function;
}

void Package::setFunction(const int &function)
{
    m_function = function;
}
quint16 Package::length() const
{
    return m_length;
}

void Package::setLength(const quint16 &length)
{
    m_length = length;
}
QByteArray Package::body() const
{
    return m_body;
}

void Package::setBody(const QByteArray &body)
{
    m_body = body;
}
quint16 Package::checkCode() const
{
    return m_checkCode;
}

void Package::setCheckCode(const quint16 &checkCode)
{
    m_checkCode = checkCode;
}
QByteArray Package::tail() const
{
    return m_tail;
}

void Package::setTail(const QByteArray &tail)
{
    m_tail = tail;
}

PortStruct Package::portStruct()const
{
    return m_source;
}
void Package::setPortStruct(const PortStruct &source)
{
    m_source=source;
}

QMap<QByteArray,QByteArray> Package::HttpHead() const
{
    return m_httpHead;
}

void Package::setHttpHead(const QMap<QByteArray, QByteArray> &httpHead)
{
    m_httpHead=httpHead;
}



SeData Package::seData() const
{
    return m_sedata;
}
void Package::setSeData(const struct SeData &sedata)
{
    m_sedata = sedata;
}

void Package::clear()
{
    this->m_head.clear();
    this->m_version = 0;
    this->m_id = 0;
    this->m_function = 0;
    this->m_length = 0;
    this->m_body.clear();
    this->m_checkCode = 0;
    this->m_tail.clear();
}
















